package bsh;

import java.util.Map;
import java.util.Set;

import bsh.meta.TypeWrapper;

/**
 * @author takeshi
 */
public interface TypeResolver {

    /**
     * Resolve um tipo, contando com os imports
     * 
     * @param name String
     * @return {@link TypeWrapper}
     */
    TypeWrapper resolveType(String name);

    /**
     * @param parent {@link TypeResolver}
     */
    void copyTypeAliases(TypeResolver parent);

    /**
     * Adiciona um import, nao necessariamente para o nome da classe
     * 
     * @param name String
     * @param type {@link TypeWrapper}
     */
    void addTypeAlias(String name, TypeWrapper type);

    /**
     * Adiciona um import .*
     * 
     * @param packageName String
     */
    void addWildcardImport(String packageName);

    /**
     * @return the {@link ReflectionUtils}
     */
    ReflectionUtils getReflectionUtils();

    /**
     * @return all the imports currently defined. Modification on the returned map may not reflect on this {@link TypeResolver}
     */
    Map<String, TypeWrapper> getImports();

    /**
     * @return the wildCards
     */
    Set<String> getWildCards();

}
